import axios from 'axios'
const tokenId = '9vxwH08hI5oIg+SxZYfNjpNegeaUq/5c'
const freezeReasonUrl = '/acc_cms/user/appuser/freeze_user_type.test'
var freezeReasonService = {
  freezeReasons: [],
  getFreezeReasons: function () {
    var formData = new FormData()
    formData.append('token', tokenId)
    return axios({
      'url': freezeReasonUrl,
      'data': formData,
      'method': 'post',
      'headers': {
        'Content-Type': 'application/x-www-form-urlencoded',
        'Accept': '*/*'
      }
    })
  },
  refreshFreezeReason: function () {
    var _this = this
    this.getFreezeReasons().then(response => {
      console.log(response)
      if (response && response.data && response.data.data) {
        _this.freezeReasons = response.data.data
      }
    }, response => {
      console.log(response)
    })
  }
}
freezeReasonService.refreshFreezeReason()
export default freezeReasonService
